package com.example.mentalhealth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.mentalhealth.entities.ExamPaper;
import com.example.mentalhealth.entities.ExamRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface ExamPaperMapper extends BaseMapper<ExamPaper> {

    // 查询
    List<ExamPaper> selectByQuery(@Param("examPaper") ExamPaper examPaper);

    // 根据标题查询id
    Long getIdByTitle(@Param("title") String title);

    // 根据id查询标题
    String getTitleById(@Param("paperId") Long paperId);


    List<ExamPaper> queryAllExamPaper();

    ExamPaper queryById(@Param("paperId") Long paperId);

    void updateScoreById(@Param("totalScore") BigDecimal totalScore, @Param("passScore") BigDecimal passScore, @Param("id") Long id);
}
